﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Students/Students.Master"Inherits="System.Web.Mvc.ViewPage<Lecturer>" %>
<%@ Import Namespace="ViewRes" %>

<asp:Content ID="ScriptsContent" ContentPlaceHolderID="ScriptsContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%:Model.ToString()%></h2>
        <%
            if (Model.CollaborationRooms.Where(r => r.DeletionDate == null).Count() == 0)
            {%>
            <%:StudentsStrings.NoThemes%>
        <%
                return;
            }%>
    <div style="margin: 1em auto; position: relative; text-align: left; width: 763px; z-index: 1;">
        <ol style="list-style: none outside none;">
            <%
            foreach (CollaborationRoom room in Model.CollaborationRooms.Where(r => r.DeletionDate == null))
            {
                foreach (var keyPaarValue in (Dictionary<Lecturer, IEnumerable<CollaborationRoom>>)ViewData["FreeThemes"])
                {
                    foreach (CollaborationRoom cRoom in keyPaarValue.Value)
                    {
                        if (room.CollaborationRoomId == cRoom.CollaborationRoomId)
                        {
                            ViewData["CanTakingTheme"] = true;
                        }
                    }
                }%>
            <li>
                <%
                Html.RenderPartial("~/Views/CollaborationRooms/StudentViewLecturerThemeControl.ascx", room, ViewData);%></li>
            <%
            }%>
        </ol>
    </div>
</asp:Content>
